<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>成都家政服务系统</title>
    <!-- Bootstrap core CSS -->
    <link href="{{asset('layui/css/layui.css')}}" rel="stylesheet" media="all">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/dashboard.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('layui/layui.js')}}" charset="utf-8"></script>
    <script src="{{asset('jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('bootstrap/js/bootstrap.min.js')}}"></script>
</head>
<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">成都家政服务系统</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">成都家政服务系统</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="javascript:;">{{session("employee_name")}}，欢迎您</a></li>
                <li><a href="javascript:;">职位：{{session("employee_power")}}</a></li>
                <li><a href="/adminLogout" style="color: red">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-2 sidebar">
            <ul class="nav nav-sidebar">
                <li><a href="javascript:;" style="background-color: lightgrey"><h4><strong>人员</strong></h4></a></li>
                <li><a href="/searchEmployee">查看员工</a></li>
                <li  class="active"><a href="/checkEmployee">审核申请</a></li>
            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="javascript:;" style="background-color: lightgrey"><h4><strong>区域</strong></h4></a></li>
                <li><a href="/areaManage">区域管理</a></li>
            </ul>
            <ul class="nav nav-sidebar">
                <li><a href="javascript:;" style="background-color: lightgrey"><h4><strong>财务</strong></h4></a></li>
                <li><a href="/searchMoney">财务统计</a></li>
            </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="page-header">审核申请</h2>

            <div class="panel-body" >
                <div class="form-inline" >
                    <div class="form-group">
                        <form action="" method="get">
                            <input type="hidden" name="_token" value="{{ csrf_token() }}">
                            <div class="form-group">
                                <h4>区域选择：</h4>
                            </div>
                            <div class="form-group">
                                <select class="form-control" name="area_id">
                                    @foreach($areaSelect as $value)
                                        <option value="{{$value->area_id}}" >{{$value->area_name}}</option>
                                    @endforeach
                                </select>
                            </div>
                            <button type="submit" class="btn btn-primary">确定</button>
                        </form>
                    </div>
                </div>
                <hr>
                <!--表格-->
                <div class="table-responsive">
                    <table class="table table-bordered table-responsive table-striped table-hover">
                        <thead>
                        <tr>
                            <th>申请时间</th>
                            <th>申请人</th>
                            <th>性别</th>
                            <th>年龄</th>
                            <th>区域</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach($checkEmployee as $data)
                            <tr>

                                <td scope="row">{{$data->employee_time}}</td>
                                <td>{{$data->employee_name}}</td>
                                <td>{{$data->employee_sex}}</td>
                                <td>{{$data->employee_age}}</td>
                                <td>{{$data->area_name}}</td>
                                <td><button type="button" class="btn btn-info btn-block btn-sm" data-toggle="modal" data-target="#moreInfo{{$data->employee_id}}">详情</button></td>
                                <div class="modal fade" id="moreInfo{{$data->employee_id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                    <div class="modal-dialog">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                                <h4 class="modal-title" id="myModalLabel">当前申请人：{{$data->employee_name}}</h4>
                                            </div>
                                            <div class="modal-body">
                                                <h4>联系方式：{{$data->employee_phone}}</h4>
                                                <h4>身份证号：{{$data->employee_id}}</h4>
                                                <h4>个人说明：{{$data->employee_info}}</h4>
                                            </div>
                                            <div class="modal-footer form-inline" >
                                                <div class="form-group">
                                                    <form action="/checkEmployees" method="post">
                                                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                        <input type="hidden" name="success" value="{{$data->employee_id}}">
                                                        <button type="submit" class="btn btn-success">通过</button>
                                                    </form>
                                                </div>
                                                <div class="form-group">
                                                    <form action="/delcheckEmployees" method="post">
                                                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                        <input type="hidden" name="false" value="{{$data->employee_id}}">
                                                        <button type="submit" class="btn btn-danger" >不通过</button>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                    <hr>
                    <div class="bs-example" data-example-id="disabled-active-pagination">
                        <nav aria-label="...">
                            <ul class="pager">
                                <li><a href="#">上一页</a></li>
                                <li><a href="#">下一页</a></li>
                            </ul>
                        </nav>
                    </div>
                </div>
        </div>
    </div>
</div>
</body>
</html>